<div xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a="https://ajax4jsf.dev.java.net/ajax"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib"><ui:composition
	template="/templates/layout/columns_3.xhtml">

	<ui:define name="column1">
		<br />
	</ui:define>
	<ui:define name="column2">
		<h:form id="loginPanelForm">
			<rich:panel id="loginPanel" styleClass="blue-panel">
				<a:region renderRegionOnly="true">
					<ctg:status />
					<h1><h:outputText
						value="#{messages['title.login']}" />
					<s:div styleClass="subtitle"><h:outputText
						value="#{messages['subtitle.dont.have.account.1']} " /> <h:outputLink
						value="#{application.contextPath}/user/registration.seam">
						<f:param name="l" value="#{currentLang}"/>
						<h:outputText value="#{messages['subtitle.dont.have.account.2']}" />
					</h:outputLink> <h:outputText value=" #{messages['subtitle.dont.have.account.3']}" />
					</s:div>
					</h1>

					<a:outputPanel ajaxRendered="true">
						<h:messages styleClass="message" errorClass="error"
							infoClass="error" globalOnly="true" />
						
						<s:decorate id="usernameDecoration"
							template="/templates/edit.xhtml">
							<ui:define name="label">#{messages['label.username']}</ui:define>
							<h:inputText id="username"
								styleClass="field" value="#{identity.username}" required="true">

							</h:inputText>
						</s:decorate>
						<s:decorate id="passwordDecoration"
							template="/templates/edit.xhtml">
							<ui:define name="label">#{messages['label.password.short']}</ui:define>
							<h:inputSecret id="password"
								styleClass="field" value="#{identity.password}" required="true"
								redisplay="true">

							</h:inputSecret>
						</s:decorate>
						<!--<h:outputLabel for="rememberMe">#{messages['label.remeber.me']}</h:outputLabel>
				<h:selectBooleanCheckbox id="rememberMe"
					value="#{identity.rememberMe}" required="true">
				</h:selectBooleanCheckbox>
				<br />-->
						<a:commandButton value="Login" action="#{identity.login}"
							styleClass="submit" />
					</a:outputPanel>
				</a:region>
				<br />

			</rich:panel>

			<br />
			<br />
			<rich:panel styleClass="blue-panel">
				<a:region renderRegionOnly="true">
					<ctg:status />
					<h1>#{messages['message.lost.username']}
					<s:div styleClass="subtitle">#{messages['message.enter.email']}</s:div>
					</h1>

					<s:decorate id="emailDecoration2" template="/templates/edit.xhtml">
						<ui:define name="label">#{messages['label.email']}</ui:define>
						<h:inputText id="email2" styleClass="field"
							required="true" value="#{retrievePasswordAction.email}">

						</h:inputText>
					</s:decorate>
					<a:commandButton value="#{messages['label.retrieve.password']}"
						action="#{retrievePasswordAction.send}" styleClass="submit"
						reRender="emailDecoration2" />
				</a:region>
			</rich:panel>
		</h:form>
	</ui:define>
</ui:composition></div>